Verification of RootPPL

Viktor Senderov
21 April 2021

What I tested?

trees
[1] "Accipitridae" "BC7"          "P20b"         "TitTyranRest"
num_nodes
[1] 349 179 249 631
depth
[1] 30 14 15 22
  • 20,000 and 200,000 particles – ClaDS2 model with delayed sampling.
  • 10,000 and 100,000 particles – ClaDS2 model without delayed sampling but with factorization.
  • Birch results with 5,000 particles with AFP from concept paper.
  • log Z computation on the moth tree with 2411 nodes and 41 maximum depth.
  • 200,000 particle model resamples at the end and drops only 5,000 samples

Models and priors

Models:

[1] "birch-clads2"  "clads2-d-λμασ" "clads2-factor"
  • CRBD Model also available but not shown in this iteration of the tests.
  • Partial delayed models are available (not all parameters delayed).

Priors:

floating_t kLambda  = 1.0;
floating_t thetaLambda = 1.0;
floating_t epsMin = 0.0;
floating_t epsMax = 1.0;
floating_t kMu  = 1.0;
floating_t thetaMu = 0.5;
floating_t a = 1.0;
floating_t b = 0.2;
  • ρ as needed.

Accipitridae (20,000) -- log Z

plot of chunk unnamed-chunk-4

evaluate_tree(prepare_tree(1))
                     var      mean   R
birch-clads2   1.0163232 -1196.680 500
clads2-d-λμασ  0.6894123 -1197.568  35
clads2-factor 15.3663905 -1200.003  20
num_nodes[1]
[1] 349
depth[1]
[1] 30

Accipitridae (20,000), λ0, one iteration

plot of chunk unnamed-chunk-6

Accipitridae (20,000), λ0, several iterations

plot of chunk unnamed-chunk-7

Accipitridae (20,000), μ0, one iteration

plot of chunk unnamed-chunk-8

Accipitridae (20,000), μ0, several iterations

plot of chunk unnamed-chunk-9

Accipitridae (20,000), log α

  • Error reading the Birch quantiles, so only RootPPL data shown

plot of chunk unnamed-chunk-10

Accipitridae (20,000), σ2, one iteration

  • Maybe I need to square my σ?

plot of chunk unnamed-chunk-11

Accipitridae (20,000), σ2, several iterations

  • Maybe I need to square my σ?

plot of chunk unnamed-chunk-12

Accipitridae (200,000) -- log Z

plot of chunk unnamed-chunk-13

evaluate_tree(prepare_tree(1))
                     var      mean   R
birch-clads2  1.01632322 -1196.680 500
clads2-d-λμασ 0.08270667 -1197.048  10
clads2-factor 0.32598095 -1197.117  15
num_nodes[1]
[1] 349
depth[1]
[1] 30

Accipitridae (200,000), λ0, one iteration

plot of chunk unnamed-chunk-15

Accipitridae (200,000), λ0, several iterations

plot of chunk unnamed-chunk-16

Accipitridae (20,000), μ0, one iteration

plot of chunk unnamed-chunk-17

Accipitridae (200,000), μ0, several iterations

plot of chunk unnamed-chunk-18

Accipitridae (200,000), log α

  • Error reading the Birch quantiles, so only RootPPL data shown

plot of chunk unnamed-chunk-19

Accipitridae (200,000), σ2, one iteration

  • Maybe I need to square my σ?

plot of chunk unnamed-chunk-20

Accipitridae (200,000), σ2, several iterations

  • Maybe I need to square my σ?

plot of chunk unnamed-chunk-21

BC7 (20,000) -- log Z

plot of chunk unnamed-chunk-22

evaluate_tree(prepare_tree(1))
                     var      mean   R
birch-clads2   1.0163232 -1196.680 500
clads2-d-λμασ  0.6894123 -1197.568  35
clads2-factor 15.3663905 -1200.003  20
num_nodes[1]
[1] 349
depth[1]
[1] 30

BC7 (20,000), λ0, one iteration

plot of chunk unnamed-chunk-24

BC7 (20,000), λ0, several iterations

plot of chunk unnamed-chunk-25

BC7 (20,000), μ0, one iteration

plot of chunk unnamed-chunk-26

BC7 (20,000), μ0, several iterations

plot of chunk unnamed-chunk-27

BC7 (20,000), log α

  • Error reading the Birch quantiles, so only RootPPL data shown

plot of chunk unnamed-chunk-28

BC7 (20,000), σ2, one iteration

  • Maybe I need to square my σ?

plot of chunk unnamed-chunk-29

BC7 (20,000), σ2, several iterations

  • Maybe I need to square my σ?

plot of chunk unnamed-chunk-30

BC7 (200,000) -- log Z

plot of chunk unnamed-chunk-31

evaluate_tree(prepare_tree(1))
                     var      mean   R
birch-clads2  1.01632322 -1196.680 500
clads2-d-λμασ 0.08270667 -1197.048  10
clads2-factor 0.32598095 -1197.117  15
num_nodes[1]
[1] 349
depth[1]
[1] 30

BC7 (200,000), λ0, one iteration

plot of chunk unnamed-chunk-33

BC7 (200,000), λ0, several iterations

plot of chunk unnamed-chunk-34

BC7 (200,000), μ0, one iteration

plot of chunk unnamed-chunk-35

BC7 (200,000), μ0, several iterations

plot of chunk unnamed-chunk-36

BC7 (200,000), log α

  • Error reading the Birch quantiles, so only RootPPL data shown

plot of chunk unnamed-chunk-37

BC7 (200,000), σ2, one iteration

  • Maybe I need to square my σ?

plot of chunk unnamed-chunk-38

BC7 (200,000), σ2, several iterations

  • Maybe I need to square my σ?

plot of chunk unnamed-chunk-39

P20b (20,000)

plot of chunk unnamed-chunk-40

evaluate_tree(prepare_tree(3))
                    var      mean   R
birch-clads2  0.2844107 -732.6992 500
clads2-d-λμασ 0.1001505 -732.0762  35
clads2-factor 1.6346493 -733.3985  20
num_nodes[3]
[1] 249
depth[3]
[1] 15

P20b (200,000)

plot of chunk unnamed-chunk-42

evaluate_tree(prepare_tree(3))
                     var      mean   R
birch-clads2  0.28441072 -732.6992 500
clads2-d-λμασ 0.01558204 -731.9716  10
clads2-factor 0.09842724 -732.6297  15
num_nodes[3]
[1] 249
depth[3]
[1] 15

TitTyranRest (20,000)

plot of chunk unnamed-chunk-44

evaluate_tree(prepare_tree(4))
                     var      mean   R
birch-clads2   1.7448063 -2260.875 500
clads2-d-λμασ  0.7928835 -2260.864  35
clads2-factor 14.0067105 -2263.895  20
num_nodes[4]
[1] 631
depth[4]
[1] 22

TitTyranRest (200,000)

plot of chunk unnamed-chunk-46

evaluate_tree(prepare_tree(4))
                     var      mean   R
birch-clads2   1.7448063 -2260.875 500
clads2-d-λμασ  0.7928835 -2260.864  35
clads2-factor 14.0067105 -2263.895  20
num_nodes[4]
[1] 631
depth[4]
[1] 22

What more?

  • factors: have the data, but haven't visualized them yet
  • global parameters for two more trees
  • for the moth tree, var Z is (based on 1.5 mio parts)
logz = c(-11053.1,-11053.3,-11051.8,-11052,-11053.5,-11053.1,-11051.3,-11051.9,-11053.5,-11054,-11052.5,-11054.5,-11051.1,-11052.4,-11052.4,-11052.9,-11054,-11053.7,-11051)
var(logz)
[1] 1.064678

JUNK

Prepare data